These bad boys were introduced by the SSE2 instruction set
Notes on SSE Intrinsics in general
Data types:
__m128 f; // = {float f0, f1, f2, f3} __m128d d; // = {double d0, d1} __m128i i; // 16 8-bit, 8-16 bit, 4 32-bit or 2-64 bit ints
mm<intrin_op>_<suffix> --
Suffixes: p -- packed; s -- single;
4.
secret - (char*) array1 = 131152 which is the distance from array1 to secret
(char*) (uint8_t*)
WHY?
| Memory Structure | Contents | Relative address in bytes |
|---|---|---|
| int array1_size | Contains 16 | 0 |
| uint8_t unused1[64] | 4 | |
| uint8_t array1[16] | Contains ints 1-16 | 68 |
| uint8_t unused2[64] | 84 | |
| uint8_t array2[256 * 512] | 148 | |
| char* secret | Contains the secret | 131220 |
| uint8_t temp | Contains 0 | 131220 + secret length |
Experiment results
Initially we changed the ration between the leading suggestion and second best guess from 2 to 1.5. This improved performnace from ~3.5-4s to ~1second on default threshold. After that we decided to check how changing threshold affects runtime and discovered the following data for our runs 20_30